﻿using TransferPost.Docking;

namespace TransferPost.Forms
{
    public partial class frmBottom : DockContent
    {
        public frmBottom()
        {
            InitializeComponent();
        }

        public void ClearText()
        {
            this.richTextBox1.Text = "";
        }

        public void AppendText(string msg)
        {
            this.richTextBox1.AppendText(msg);
        }

        private void richTextBox1_TextChanged(object sender, System.EventArgs e)
        {
            //this.richTextBox1.SelectionStart = this.richTextBox1.Text.Length;

            //this.richTextBox1.ScrollToCaret();

            richTextBox1.SelectionStart = richTextBox1.Text.Length;
            richTextBox1.SelectionLength = 0;
            richTextBox1.Focus();
        }
    }
}
